#include<bits/stdc++.h>
using namespace std;

string s = "tocyjkdzcieoiodfpbgcncsrjbhmugdnojjddhllnofawllbhfiadgdcdjstemphmnjihecoapdjjrprrqnhgccevdarufmliqijgihhfgdcmxvicfauachlifhafpdccfseflcdgjncadfclvfmadvrnaaahahndsikzssoywakgnfjjaihtniptwoulxbaeqkqhfwl";
// string s1 = "lanqiao";
int dp[220];
int main () {
    int len = s.length();
    int ans = 0;
    for (int i = 0; i < len; i++) {
        dp[i] = 1;
    }
    for (int i = 0; i < len; i++) {
        for (int j = 0; j < i; j++) {
            if (s[j] < s[i]) dp[i] += dp[j];
            else if (s[j] == s[i]) dp[i] -= dp[j];
        }
    }
    for (int i = 0; i < len; i++) {
        ans += dp[i];
    }
    cout << ans << endl;
    return 0;
}